<template>
  <div>
    <el-container>
      <!-- 左侧导航栏 -->
      <el-aside>
        <el-menu router default-active="/" class="el-menu-vertical-demo">
          <el-menu-item index="/">
            <i class="el-icon-menu"></i>
            <span slot="title">单选题</span>
          </el-menu-item>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>导航二</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/check-box-topic">多选题</el-menu-item>
              <el-menu-item index="/completion">填空题</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>测试练习</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/excel">表格</el-menu-item>
              <el-menu-item index="3-2">导出</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-container>
        <!-- 顶部标题 -->
        <el-header>
          {{ header }}
        </el-header>
        <!-- 主要内容 -->
        <el-main>
          <!-- {{ main }} -->
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "Index",
  data() {
    return {
      aside: "左侧导航",
      header: "顶部标题",
      main: "主要内容",
    };
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  /* background-color: #d3dce6; */
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>
